Integrand size = 25, antiderivative size = 319 \[ \int (3+3 \sin (e+f x))^m (c+d \sin (e+f x))^3 \, dx=-\frac {d \left (d^2 (4+m)-c d \left (5-3 m-2 m^2\right )+2 c^2 \left (8+6 m+m^2\right )\right ) \cos (e+f x) (3+3 \sin (e+f x))^m}{f (1+m) (2+m) (3+m)}-\frac {2^{\frac {1}{2}+m} \left (d^3 m \left (5+3 m+m^2\right )+3 c^2 d m \left (6+5 m+m^2\right )+3 c d^2 \left (3+4 m+4 m^2+m^3\right )+c^3 \left (6+11 m+6 m^2+m^3\right )\right ) \cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2}-m,\frac {3}{2},\frac {1}{2} (1-\sin (e+f x))\right ) (1+\sin (e+f x))^{-\frac {1}{2}-m} (3+3 \sin (e+f x))^m}{f (1+m) (2+m) (3+m)}-\frac {d^2 (d m+c (5+m)) \cos (e+f x) (3+3 \sin (e+f x))^{1+m}}{3 f (2+m) (3+m)}-\frac {d \cos (e+f x) (3+3 \sin (e+f x))^m (c+d \sin (e+f x))^2}{f (3+m)} \]
-d*(d^2*(4+m)-c*d*(-2*m^2-3*m+5)+2*c^2*(m^2+6*m+8))*cos(f*x+e)*(a+a*sin(f* x+e))^m/f/(3+m)/(m^2+3*m+2)-2^(1/2+m)*(d^3*m*(m^2+3*m+5)+3*c^2*d*m*(m^2+5* m+6)+3*c*d^2*(m^3+4*m^2+4*m+3)+c^3*(m^3+6*m^2+11*m+6))*cos(f*x+e)*hypergeo m([1/2, 1/2-m],[3/2],1/2-1/2*sin(f*x+e))*(1+sin(f*x+e))^(-1/2-m)*(a+a*sin( f*x+e))^m/f/(3+m)/(m^2+3*m+2)-d^2*(d*m+c*(5+m))*cos(f*x+e)*(a+a*sin(f*x+e) )^(1+m)/a/f/(2+m)/(3+m)-d*cos(f*x+e)*(a+a*sin(f*x+e))^m*(c+d*sin(f*x+e))^2 /f/(3+m)
Result contains complex when optimal does not.
Time = 22.45 (sec) , antiderivative size = 455, normalized size of antiderivative = 1.43 \[ \int (3+3 \sin (e+f x))^m (c+d \sin (e+f x))^3 \, dx=\frac {i 3^m (1+\sin (e+f x))^m (\cos (e+f x)+i (1+\sin (e+f x))) \left (-\frac {4 i c \left (2 c^2+3 d^2\right ) \operatorname {Hypergeometric2F1}(1,1+m,1-m,i \cos (e+f x)-\sin (e+f x))}{m}+\frac {3 d \left (4 c^2+d^2\right ) \operatorname {Hypergeometric2F1}(1,m,-m,i \cos (e+f x)-\sin (e+f x)) (\cos (e+f x)-i \sin (e+f x))}{1+m}-\frac {3 d \left (4 c^2+d^2\right ) \operatorname {Hypergeometric2F1}(1,2+m,2-m,i \cos (e+f x)-\sin (e+f x)) (\cos (e+f x)+i \sin (e+f x))}{-1+m}+\frac {6 i c d^2 \operatorname {Hypergeometric2F1}(1,3+m,3-m,i \cos (e+f x)-\sin (e+f x)) (\cos (2 (e+f x))+i \sin (2 (e+f x)))}{-2+m}+\frac {6 c d^2 \operatorname {Hypergeometric2F1}(1,-1+m,-1-m,i \cos (e+f x)-\sin (e+f x)) (i \cos (2 (e+f x))+\sin (2 (e+f x)))}{2+m}-\frac {d^3 \operatorname {Hypergeometric2F1}(1,-2+m,-2-m,i \cos (e+f x)-\sin (e+f x)) (\cos (3 (e+f x))-i \sin (3 (e+f x)))}{3+m}+\frac {d^3 \operatorname {Hypergeometric2F1}(1,4+m,4-m,i \cos (e+f x)-\sin (e+f x)) (\cos (3 (e+f x))+i \sin (3 (e+f x)))}{-3+m}\right )}{8 f} \]
((I/8)*3^m*(1 + Sin[e + f*x])^m*(Cos[e + f*x] + I*(1 + Sin[e + f*x]))*(((- 4*I)*c*(2*c^2 + 3*d^2)*Hypergeometric2F1[1, 1 + m, 1 - m, I*Cos[e + f*x] - Sin[e + f*x]])/m + (3*d*(4*c^2 + d^2)*Hypergeometric2F1[1, m, -m, I*Cos[e + f*x] - Sin[e + f*x]]*(Cos[e + f*x] - I*Sin[e + f*x]))/(1 + m) - (3*d*(4 *c^2 + d^2)*Hypergeometric2F1[1, 2 + m, 2 - m, I*Cos[e + f*x] - Sin[e + f* x]]*(Cos[e + f*x] + I*Sin[e + f*x]))/(-1 + m) + ((6*I)*c*d^2*Hypergeometri c2F1[1, 3 + m, 3 - m, I*Cos[e + f*x] - Sin[e + f*x]]*(Cos[2*(e + f*x)] + I *Sin[2*(e + f*x)]))/(-2 + m) + (6*c*d^2*Hypergeometric2F1[1, -1 + m, -1 - m, I*Cos[e + f*x] - Sin[e + f*x]]*(I*Cos[2*(e + f*x)] + Sin[2*(e + f*x)])) /(2 + m) - (d^3*Hypergeometric2F1[1, -2 + m, -2 - m, I*Cos[e + f*x] - Sin[ e + f*x]]*(Cos[3*(e + f*x)] - I*Sin[3*(e + f*x)]))/(3 + m) + (d^3*Hypergeo metric2F1[1, 4 + m, 4 - m, I*Cos[e + f*x] - Sin[e + f*x]]*(Cos[3*(e + f*x) ] + I*Sin[3*(e + f*x)]))/(-3 + m)))/f
Time = 1.37 (sec) , antiderivative size = 318, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.480, Rules used = {3042, 3262, 3042, 3447, 3042, 3502, 3042, 3230, 3042, 3131, 3042, 3130}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a \sin (e+f x)+a)^m (c+d \sin (e+f x))^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a \sin (e+f x)+a)^m (c+d \sin (e+f x))^3dx\) |
\(\Big \downarrow \) 3262 |
\(\displaystyle \frac {\int (\sin (e+f x) a+a)^m (c+d \sin (e+f x)) \left (a \left ((m+3) c^2+d m c+2 d^2\right )+a d (d m+c (m+5)) \sin (e+f x)\right )dx}{a (m+3)}-\frac {d \cos (e+f x) (a \sin (e+f x)+a)^m (c+d \sin (e+f x))^2}{f (m+3)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int (\sin (e+f x) a+a)^m (c+d \sin (e+f x)) \left (a \left ((m+3) c^2+d m c+2 d^2\right )+a d (d m+c (m+5)) \sin (e+f x)\right )dx}{a (m+3)}-\frac {d \cos (e+f x) (a \sin (e+f x)+a)^m (c+d \sin (e+f x))^2}{f (m+3)}\) |
\(\Big \downarrow \) 3447 |
\(\displaystyle \frac {\int (\sin (e+f x) a+a)^m \left (a d^2 (d m+c (m+5)) \sin ^2(e+f x)+\left (a d \left ((m+3) c^2+d m c+2 d^2\right )+a c d (d m+c (m+5))\right ) \sin (e+f x)+a c \left ((m+3) c^2+d m c+2 d^2\right )\right )dx}{a (m+3)}-\frac {d \cos (e+f x) (a \sin (e+f x)+a)^m (c+d \sin (e+f x))^2}{f (m+3)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int (\sin (e+f x) a+a)^m \left (a d^2 (d m+c (m+5)) \sin (e+f x)^2+\left (a d \left ((m+3) c^2+d m c+2 d^2\right )+a c d (d m+c (m+5))\right ) \sin (e+f x)+a c \left ((m+3) c^2+d m c+2 d^2\right )\right )dx}{a (m+3)}-\frac {d \cos (e+f x) (a \sin (e+f x)+a)^m (c+d \sin (e+f x))^2}{f (m+3)}\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {\frac {\int (\sin (e+f x) a+a)^m \left (\left ((m+1) (d m+c (m+5)) d^2+c (m+2) \left ((m+3) c^2+d m c+2 d^2\right )\right ) a^2+d \left (2 \left (m^2+6 m+8\right ) c^2-d \left (-2 m^2-3 m+5\right ) c+d^2 (m+4)\right ) \sin (e+f x) a^2\right )dx}{a (m+2)}-\frac {d^2 (c (m+5)+d m) \cos (e+f x) (a \sin (e+f x)+a)^{m+1}}{f (m+2)}}{a (m+3)}-\frac {d \cos (e+f x) (a \sin (e+f x)+a)^m (c+d \sin (e+f x))^2}{f (m+3)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int (\sin (e+f x) a+a)^m \left (\left ((m+1) (d m+c (m+5)) d^2+c (m+2) \left ((m+3) c^2+d m c+2 d^2\right )\right ) a^2+d \left (2 \left (m^2+6 m+8\right ) c^2-d \left (-2 m^2-3 m+5\right ) c+d^2 (m+4)\right ) \sin (e+f x) a^2\right )dx}{a (m+2)}-\frac {d^2 (c (m+5)+d m) \cos (e+f x) (a \sin (e+f x)+a)^{m+1}}{f (m+2)}}{a (m+3)}-\frac {d \cos (e+f x) (a \sin (e+f x)+a)^m (c+d \sin (e+f x))^2}{f (m+3)}\) |
\(\Big \downarrow \) 3230 |
\(\displaystyle \frac {\frac {\frac {a^2 \left (c^3 \left (m^3+6 m^2+11 m+6\right )+3 c^2 d m \left (m^2+5 m+6\right )+3 c d^2 \left (m^3+4 m^2+4 m+3\right )+d^3 m \left (m^2+3 m+5\right )\right ) \int (\sin (e+f x) a+a)^mdx}{m+1}-\frac {a^2 d \left (2 c^2 \left (m^2+6 m+8\right )-c d \left (-2 m^2-3 m+5\right )+d^2 (m+4)\right ) \cos (e+f x) (a \sin (e+f x)+a)^m}{f (m+1)}}{a (m+2)}-\frac {d^2 (c (m+5)+d m) \cos (e+f x) (a \sin (e+f x)+a)^{m+1}}{f (m+2)}}{a (m+3)}-\frac {d \cos (e+f x) (a \sin (e+f x)+a)^m (c+d \sin (e+f x))^2}{f (m+3)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {a^2 \left (c^3 \left (m^3+6 m^2+11 m+6\right )+3 c^2 d m \left (m^2+5 m+6\right )+3 c d^2 \left (m^3+4 m^2+4 m+3\right )+d^3 m \left (m^2+3 m+5\right )\right ) \int (\sin (e+f x) a+a)^mdx}{m+1}-\frac {a^2 d \left (2 c^2 \left (m^2+6 m+8\right )-c d \left (-2 m^2-3 m+5\right )+d^2 (m+4)\right ) \cos (e+f x) (a \sin (e+f x)+a)^m}{f (m+1)}}{a (m+2)}-\frac {d^2 (c (m+5)+d m) \cos (e+f x) (a \sin (e+f x)+a)^{m+1}}{f (m+2)}}{a (m+3)}-\frac {d \cos (e+f x) (a \sin (e+f x)+a)^m (c+d \sin (e+f x))^2}{f (m+3)}\) |
\(\Big \downarrow \) 3131 |
\(\displaystyle \frac {\frac {\frac {a^2 \left (c^3 \left (m^3+6 m^2+11 m+6\right )+3 c^2 d m \left (m^2+5 m+6\right )+3 c d^2 \left (m^3+4 m^2+4 m+3\right )+d^3 m \left (m^2+3 m+5\right )\right ) (\sin (e+f x)+1)^{-m} (a \sin (e+f x)+a)^m \int (\sin (e+f x)+1)^mdx}{m+1}-\frac {a^2 d \left (2 c^2 \left (m^2+6 m+8\right )-c d \left (-2 m^2-3 m+5\right )+d^2 (m+4)\right ) \cos (e+f x) (a \sin (e+f x)+a)^m}{f (m+1)}}{a (m+2)}-\frac {d^2 (c (m+5)+d m) \cos (e+f x) (a \sin (e+f x)+a)^{m+1}}{f (m+2)}}{a (m+3)}-\frac {d \cos (e+f x) (a \sin (e+f x)+a)^m (c+d \sin (e+f x))^2}{f (m+3)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {a^2 \left (c^3 \left (m^3+6 m^2+11 m+6\right )+3 c^2 d m \left (m^2+5 m+6\right )+3 c d^2 \left (m^3+4 m^2+4 m+3\right )+d^3 m \left (m^2+3 m+5\right )\right ) (\sin (e+f x)+1)^{-m} (a \sin (e+f x)+a)^m \int (\sin (e+f x)+1)^mdx}{m+1}-\frac {a^2 d \left (2 c^2 \left (m^2+6 m+8\right )-c d \left (-2 m^2-3 m+5\right )+d^2 (m+4)\right ) \cos (e+f x) (a \sin (e+f x)+a)^m}{f (m+1)}}{a (m+2)}-\frac {d^2 (c (m+5)+d m) \cos (e+f x) (a \sin (e+f x)+a)^{m+1}}{f (m+2)}}{a (m+3)}-\frac {d \cos (e+f x) (a \sin (e+f x)+a)^m (c+d \sin (e+f x))^2}{f (m+3)}\) |
\(\Big \downarrow \) 3130 |
\(\displaystyle \frac {\frac {-\frac {a^2 d \left (2 c^2 \left (m^2+6 m+8\right )-c d \left (-2 m^2-3 m+5\right )+d^2 (m+4)\right ) \cos (e+f x) (a \sin (e+f x)+a)^m}{f (m+1)}-\frac {a^2 2^{m+\frac {1}{2}} \left (c^3 \left (m^3+6 m^2+11 m+6\right )+3 c^2 d m \left (m^2+5 m+6\right )+3 c d^2 \left (m^3+4 m^2+4 m+3\right )+d^3 m \left (m^2+3 m+5\right )\right ) \cos (e+f x) (\sin (e+f x)+1)^{-m-\frac {1}{2}} (a \sin (e+f x)+a)^m \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2}-m,\frac {3}{2},\frac {1}{2} (1-\sin (e+f x))\right )}{f (m+1)}}{a (m+2)}-\frac {d^2 (c (m+5)+d m) \cos (e+f x) (a \sin (e+f x)+a)^{m+1}}{f (m+2)}}{a (m+3)}-\frac {d \cos (e+f x) (a \sin (e+f x)+a)^m (c+d \sin (e+f x))^2}{f (m+3)}\) |
-((d*Cos[e + f*x]*(a + a*Sin[e + f*x])^m*(c + d*Sin[e + f*x])^2)/(f*(3 + m ))) + (-((d^2*(d*m + c*(5 + m))*Cos[e + f*x]*(a + a*Sin[e + f*x])^(1 + m)) /(f*(2 + m))) + (-((a^2*d*(d^2*(4 + m) - c*d*(5 - 3*m - 2*m^2) + 2*c^2*(8 + 6*m + m^2))*Cos[e + f*x]*(a + a*Sin[e + f*x])^m)/(f*(1 + m))) - (2^(1/2 + m)*a^2*(d^3*m*(5 + 3*m + m^2) + 3*c^2*d*m*(6 + 5*m + m^2) + 3*c*d^2*(3 + 4*m + 4*m^2 + m^3) + c^3*(6 + 11*m + 6*m^2 + m^3))*Cos[e + f*x]*Hypergeom etric2F1[1/2, 1/2 - m, 3/2, (1 - Sin[e + f*x])/2]*(1 + Sin[e + f*x])^(-1/2 - m)*(a + a*Sin[e + f*x])^m)/(f*(1 + m)))/(a*(2 + m)))/(a*(3 + m))
3.7.7.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-2^(n + 1/2))*a^(n - 1/2)*b*(Cos[c + d*x]/(d*Sqrt[a + b*Sin[c + d*x]]))*Hypergeome tric2F1[1/2, 1/2 - n, 3/2, (1/2)*(1 - b*(Sin[c + d*x]/a))], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[a^2 - b^2, 0] && !IntegerQ[2*n] && GtQ[a, 0]
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[a^IntPar t[n]*((a + b*Sin[c + d*x])^FracPart[n]/(1 + (b/a)*Sin[c + d*x])^FracPart[n] ) Int[(1 + (b/a)*Sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[a^2 - b^2, 0] && !IntegerQ[2*n] && !GtQ[a, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/( f*(m + 1))), x] + Simp[(a*d*m + b*c*(m + 1))/(b*(m + 1)) Int[(a + b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && !LtQ[m, -2^(-1)]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(-d)*Cos[e + f*x]*(a + b*Sin[e + f*x]) ^m*((c + d*Sin[e + f*x])^(n - 1)/(f*(m + n))), x] + Simp[1/(b*(m + n)) In t[(a + b*Sin[e + f*x])^m*(c + d*Sin[e + f*x])^(n - 2)*Simp[d*(a*c*m + b*d*( n - 1)) + b*c^2*(m + n) + d*(a*d*m + b*c*(m + 2*n - 1))*Sin[e + f*x], x], x ], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[n, 1] && IntegerQ[n]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
\[\int \left (a +a \sin \left (f x +e \right )\right )^{m} \left (c +d \sin \left (f x +e \right )\right )^{3}d x\]
\[ \int (3+3 \sin (e+f x))^m (c+d \sin (e+f x))^3 \, dx=\int { {\left (d \sin \left (f x + e\right ) + c\right )}^{3} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} \,d x } \]
integral(-(3*c*d^2*cos(f*x + e)^2 - c^3 - 3*c*d^2 + (d^3*cos(f*x + e)^2 - 3*c^2*d - d^3)*sin(f*x + e))*(a*sin(f*x + e) + a)^m, x)
\[ \int (3+3 \sin (e+f x))^m (c+d \sin (e+f x))^3 \, dx=\int \left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{m} \left (c + d \sin {\left (e + f x \right )}\right )^{3}\, dx \]
\[ \int (3+3 \sin (e+f x))^m (c+d \sin (e+f x))^3 \, dx=\int { {\left (d \sin \left (f x + e\right ) + c\right )}^{3} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} \,d x } \]
\[ \int (3+3 \sin (e+f x))^m (c+d \sin (e+f x))^3 \, dx=\int { {\left (d \sin \left (f x + e\right ) + c\right )}^{3} {\left (a \sin \left (f x + e\right ) + a\right )}^{m} \,d x } \]
Timed out. \[ \int (3+3 \sin (e+f x))^m (c+d \sin (e+f x))^3 \, dx=\int {\left (a+a\,\sin \left (e+f\,x\right )\right )}^m\,{\left (c+d\,\sin \left (e+f\,x\right )\right )}^3 \,d x \]